package il.ac.braude.sona.strings;

import java.awt.Image;
import java.io.IOException;
import java.net.URL;

import javax.imageio.ImageIO;

public class Resources {
	public class Strings {
		public static final String LoginFormTitle = "Welcome To Braude System";
		public static final String OK = "OK";
		public static final String Password = "Password : ";
		public static final String UserName = "UserName : ";
		public static final String IncorrectLogin = "Login info is incorrect.";
		public static final String BraudeSystem = "Braude System";
		public static final String CreateChangeReq = "Create Change Request";
		public static final String ViewRequestByID = "View Request By ID";
		public static final String ReqFormTitle = "Create Request";
		public static final String RequestTitleField = "Title";
		public static final String RequestCommentField = "Comment";
		public static final String RequestApproveID = "The change request is saved in the Database. \nPlease save the request id for monitoring request state in the future. \nRequest ID : %s";
		public static final String ViewFormRequID = "Request ID";
		public static final String RequestInfoTitle = "Request Info";
		public static final String NoSuchRequest = "There is no such Request.";
		public static final String ViewAllRequests = "View All Requests";
		public static final String Connecting = "Waiting for server Response...";
		public static final String ConnectFailed = "Connection Failed.";
	}
	public static class Images {
		private static Image getImage(String iname) {
	        URL imgURL = null;
			// In the debug, the images can be found in the classpath
	        if (imgURL == null)
	        {
	            imgURL = ClassLoader.getSystemResource(iname);
	        }
	        Image icon = null;
	        if (imgURL != null)
	        {
	            try {
					icon = ImageIO.read(imgURL);
				} catch (IOException e) {
					e.printStackTrace();
				}
	        }
	        return icon;
		}
		public static final Image Background = getImage("Braude_Logo.jpg");
		
	}
}
